package com.beuth.taskList.model;

import java.text.SimpleDateFormat;
import java.util.GregorianCalendar;

public class Task {
	
	private String name;
	private Priority priority;
	private TaskType taskType;
	private GregorianCalendar closingDate;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Priority getPriority() {
		return priority;
	}
	public void setPriority(Priority priority) {
		this.priority = priority;
	}
	public TaskType getTaskType() {
		return taskType;
	}
	public void setTaskType(TaskType taskType) {
		this.taskType = taskType;
	}
	public GregorianCalendar getClosingDate() {
		return closingDate;
	}
	public void setClosingDate(GregorianCalendar closingDate) {
		this.closingDate = closingDate;
	}
	
	@Override
	public String toString() {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM.yyyy");
		return "Aufgabe: " + name + " (" + taskType + ") muss am " + simpleDateFormat.format(closingDate.getTime()) +  " fertig sein.";
	}

}
